﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" Inherits="Nivdal.TeamTransfers" Title=" "
    StylesheetTheme="SkinFile" Codebehind="TeamTransfers.aspx.cs" %>

<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, TeamTransfers_PageNameLabel %>" CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="SummaryTitleLabel" runat="server" CssClass="white_title"
        Text="<%$ Resources:Resource, TeamTransfers_SummaryTitleLabel %>" ></asp:Label>
    </div>
    <div class="padding5">
        <asp:FormView ID="FormView1" runat="server" 
            DataSourceID="SqlDataSource2">
            <ItemTemplate>
                <table cellspacing="5">
                    <tr>
                        <td>
                            <asp:Label ID="TotalSalesNameLabel" runat="server" Text="<%$ Resources:Resource, TeamTransfers_TotalSalesNameLabel %>" SkinID="InfoLabel"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="TotaSalesLabel" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("Total sales")) %>' SkinID="GridLabel" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="TotalPurchasesLabel" runat="server" Text="<%$ Resources:Resource, TeamTransfers_TotalPurchasesLabel %>" SkinID="InfoLabel"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("[Total purchases]")) %>' SkinID="GridLabel" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="PurchasesLastMonthLabel" runat="server" Text="<%$ Resources:Resource, TeamTransfers_PurchasesLastMonthLabel %>" SkinID="InfoLabel"></asp:Label>
                        
                        </td>
                        <td>
                            <asp:Label ID="Label9" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("[Purchases last month]")) %>' SkinID="GridLabel" />                    
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="SalesLastMonthLabel" runat="server" Text="<%$ Resources:Resource, TeamTransfers_SalesLastMonthLabel %>" SkinID="InfoLabel"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="Label10" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("[Sales last month]")) %>' SkinID="GridLabel" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="NumberOfTransfersInLabel" runat="server" Text="<%$ Resources:Resource, TeamTransfers_NumberOfTransfersInLabel %>" SkinID="InfoLabel"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="Label11" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("[Number of transfers in]")) %>' SkinID="GridLabel" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="NumberOfTransfersOutLabel" runat="server" Text="<%$ Resources:Resource, TeamTransfers_NumberOfTransfersOutLabel %>" SkinID="InfoLabel"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="LogoLabel" runat="server" Text='<%# GetNivdalData.GetNivdalData.FormattedNumber(Eval("[Number of transfers out]")) %>' SkinID="GridLabel" />
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:FormView>
        <br /><br />
        <asp:GridView  ID="GridView1" runat="server" DataSourceID="SqlDataSource1" AutoGenerateColumns="False"
            SkinID="BigProfessional" AllowPaging="True" PageSize="20">
             <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"  Mode="NumericFirstLast"
                PageButtonCount="10" Position="Bottom" />
             <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Date %>">
                    <ItemTemplate>
                        <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_PLayer %>">
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("Player name") %>' SkinID="BlackHyperLinkSkin"
                         NavigateUrl='<%# Eval("PlayerId", "Player.aspx?Id={0}") %>' Visible='<%# !(bool)Eval("IsCoach") %>'></asp:HyperLink>
                         <asp:HyperLink ID="CoachLink" runat="server" Text='<%# Eval("Player name") %>' SkinID="BlackHyperLinkSkin"
                         NavigateUrl='<%# Eval("PlayerId", "coach.aspx?Id={0}") %>' Visible='<%# Eval("IsCoach") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, PlayerTransfers_FromTeam %>">
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink2" runat="server" Text='<%# Eval("From team") %>' SkinID="BlackHyperLinkSkin"
                         NavigateUrl='<%# Eval("SellerId", "TeamHomePage.aspx?TeamId={0}") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, PlayerTransfers_ToTeamHeaderText %>">
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink3" runat="server" Text='<%# Eval("To team") %>' SkinID="BlackHyperLinkSkin"
                         NavigateUrl='<%# Eval("BuyerId ", "TeamHomePage.aspx?TeamId={0}") %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, TeamTransfers_TransferSumHeaderText %>">
                    <ItemTemplate>
                        <asp:Label ID="TransferSumLabel" runat="server" Text='<%# FormattedNumber(Eval("Transfer sum")) %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="NoTransferedLabel" runat="server" Text="<%$ Resources:Resource, TeamTransfers_NoTransferedLabel %>" ></asp:Label>  
            </EmptyDataTemplate>
        </asp:GridView>
        <br />
        <asp:LinkButton ID="HyperLink1" runat="server" PostBackUrl="javascript:history.back();" SkinID="TitleLink" Text="<%$ Resources:Resource, Global_BackHome %>"></asp:LinkButton>
    </div>
    </div>
    
    
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetTeamTransfers" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>

    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetTeamTransfersSummary" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    
</asp:Content>
